package com.beauty.user.repository;

import com.beauty.user.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface UserRepository extends JpaRepository<User, Long> {
    Optional<User> findByUsername(String username);
    Optional<User> findByCustomerId(String customerId);
    Optional<User> findByMerchantId(String merchantId);
    boolean existsByUsername(String username);
    boolean existsByEmail(String email);
    boolean existsByMerchantId(String merchantId);
    List<User> findByIsMerchantTrue();
} 